home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / Graphics / Icons / next-icon@gun.com / Apps / ImagePortfolio / PaletteCell.h < prev    next >
Text File  |  1993-06-03  |  2KB  |  59 lines

  1. // -------------------------------------------------------------------------------------
  2. // PaletteCell.h
  3. // -------------------------------------------------------------------------------------
  4.  
  5. extern "Objective-C" {
  6. #import <libc.h>
  7. #import <mach/cthreads.h>
  8. #import <sys/time.h>
  9. #import <objc/objc.h>
  10. #import <objc/zone.h>
  11. #import <objc/error.h>
  12. #import <appkit/nextstd.h>
  13. #import <appkit/graphics.h>
  14. #import <appkit/Application.h>
  15. #import <appkit/Font.h>
  16. #import <appkit/Window.h>
  17. #import <appkit/color.h>
  18. #import <appkit/ActionCell.h>
  19. }
  20.  
  21. // -------------------------------------------------------------------------------------
  22.  
  23. @interface PaletteCell : ActionCell
  24. {
  25.     id                    imageId;            // main image id
  26.     id                    smallImage;            // abbreviated bitmap id
  27.     NXSize                imageBounds;        // icon image bounding size
  28.     char                *imagePath;            // path to image
  29.     id                    titleCell;            // title cell
  30.     id                    delegate;            // delegate handler
  31.     mutex_t                imageMutex;            // image loading mutex
  32.     BOOL                dragMode;            // matrix dragging mode
  33. }
  34.   
  35. // -------------------------------------------------------------------------------------
  36. + addImageClass:classId;
  37. + addImageExtensions:(const char*)ext1,...;
  38. + (BOOL)validExtension:(const char*)fileName;
  39. - setCellSize:(const NXSize*)cellSize;
  40. - loadImageFile;
  41. - setImageFile:(const char *)filePath;
  42. - image;
  43. - imageRepresentation:(int)imageNum;
  44. - (const char*)imagePath;
  45. - (const char*)cellTitle;
  46. - calcCellSize:(NXSize *)theSize inRect:(const NXRect *)aRect;
  47. - drawInside:(const NXRect *)cellFrame inView:controlView;
  48. - (BOOL)isSelected;
  49. - setDragMode:(BOOL)flag;
  50.  
  51. @end
  52.  
  53. // -------------------------------------------------------------------------------------
  54. // PaletteCell delegate methods
  55. @interface PaletteCell(delegate)
  56. - cellBecameSelected:sender;
  57. - cellResignedSelected:sender;
  58. @end
  59.